package com.singi.controller;

import com.eova.common.base.BaseController;
import com.jfinal.aop.Clear;
import com.jfinal.core.paragetter.Para;
import com.jfinal.plugin.activerecord.Db;
import com.jfinal.plugin.activerecord.Record;

/**
 * Created by Administrator on 2020-2-28.
 */

@Clear
public class ContractController  extends BaseController {


    public  void submitMsg(@Para("name") String name,@Para("phone") String phone,@Para("msg") String msg,@Para("market_id") int market_id){
        Record r  = new Record();
        r.set("name",name).set("phone",phone).set("message",msg).set("market_id",market_id);
        boolean result = Db.save("xj_online_message",r);
        renderJson(result);
    }

    public void getShaxiGZ(){
        Record contractList = Db.findFirst("select service_phone,merchants_phone from xj_introduce where id =2");
        renderJson(contractList);
    }

    public void getShaxiHt(){
        Record contractList = Db.findFirst("select service_phone,merchants_phone from xj_introduce where id =3");
        renderJson(contractList);
    }

    public void getShaxiSY(){
        Record contractList = Db.findFirst("select service_phone,merchants_phone from xj_introduce where id =4");
        renderJson(contractList);
    }
}
